package com.atguigu.tingshu.album.service;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackInfoVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

public interface TrackInfoService extends IService<TrackInfo> {


    IPage<TrackListVo> findUserTrackPage(Page<TrackListVo> trackListVoPage, TrackInfoQuery trackInfoQuery);

    IPage<AlbumTrackListVo> findAlbumTrackPage(Page<AlbumTrackListVo> pageParam, Long albumId, Long userId);

    /**
     * 更新统计方法
     * @param albumId
     * @param trackId
     * @param statType
     * @param count
     */
    void updateStat(Long albumId, Long trackId, String statType,Integer count);

    void updateTrackInfo(Long id, TrackInfoVo trackInfoVo);

    void removeTrackInfo(Long id);

    void saveTrackInfo(TrackInfoVo trackInfoVo, long l);


    List<Map<String, Object>> findUserTrackPaidList(Long trackId);

    List<TrackInfo> findPaidTrackInfoList(Long trackId, Integer trackCount);
}
